package cn.genmer.test.security.recordlog.context;

/**
 * @description: 日志上下文
 * @author: yyq
 * @date: 2023/8/28 10:44
 */
public class LogContext {

    private static final InheritableThreadLocal<String> OPT_SEQUENCE_NUMBER = new InheritableThreadLocal<>();

    public static void putSequenceNumber(String sequenceNumber) {
        OPT_SEQUENCE_NUMBER.set(sequenceNumber);
    }

    public static String getSequenceNumber() {
        return OPT_SEQUENCE_NUMBER.get();
    }

    public static void clear() {
        OPT_SEQUENCE_NUMBER.remove();
    }
}
